﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Renci.SshNet.Sftp;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace FastShell.Common.Model
{
    public class FileTreeModel : INotifyPropertyChanged
    {
        private ObservableCollection<FileTreeModel> _children;
        public string Name { get; set; }

        public string FullName { get; set; }

        public string Icon { get; set; }

        public string Length { get; set; }

        public string LastTime { get; set; }

        public string Type { get; set; }

        public string Permissions { get; set; }

        public string UserGroup { get; set; }

        public SftpFile SftpFile { get; set; }

        /// <summary>
        /// 子项
        /// </summary>
        public ObservableCollection<FileTreeModel> Children
        {
            get { return _children; }
            set
            {
                _children = value;
                PropertyChanged(this, new PropertyChangedEventArgs("Children"));
            }
        }
        public event PropertyChangedEventHandler PropertyChanged = delegate { };
    }
}
